home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Very Best of Atari Inside
/
The Very Best of Atari Inside 1.iso
/
mint
/
mntlb20
/
lib
/
getpass.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-08
|
330b
|
21 lines
#include <ioctl.h>
#include <stdio.h>
char *
getpass(str)
char *str;
{
static char buf[80];
struct sgttyb oldsb, newsb;
gtty(0, &oldsb);
newsb = oldsb;
newsb.sg_flags &= ~ECHO;
stty(0, &newsb);
fputs(str, stderr); fflush(stderr);
buf[0] = 0;
fgets(buf, 80, stdin);
stty(0, &oldsb);
return buf;
}